package _spring_test._ApplicationEventMulticaster;

import org.springframework.context.ApplicationEvent;

/**
 * @Author: huangya
 * @Date: 2020/5/19
 * @Description:
 */
public class EventTest extends ApplicationEvent {

    private String message;

    /**
     * Create a new ApplicationEvent.
     * @param source the object on which the event initially occurred (never {@code null})
     */
    public EventTest(Object source) {
        super(source);
    }

    public EventTest(Object source, String message) {
        super(source);
        this.message = message;
    }

    public void getMesaage(){
        System.out.println(message);
    }
}
